package com.qidian.mes.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qidian.common.annotation.DesensitivityAnnotation;
import com.qidian.mes.easyexcel.convert.DataStatusConverter;

import java.util.Date;
import java.util.List;

/**
 * @Author 戴着假发的程序员
 * @Company 起点编程
 * @Description
 * @Time 2024/10/12 上午 10:45
 */
@HeadRowHeight(25) // 表头行高
@ContentRowHeight(20)// 内容行高
@ColumnWidth(50)// 列宽
public class Dict {
    @ExcelProperty(value = "字典编号",index = 0) // 列头
    private Long dictId;
    @ExcelProperty(value = "字典名称",index = 1)
    private String dictName;
    @ExcelProperty(value = "字典类型",index = 2)
    private String dictType;
    @DesensitivityAnnotation(value = "*",length = 2,prefixNoMaskLength = 1,suffixNoMaskLength = 1)
    @ExcelProperty(value = "字典备注",index = 3)
    private String dictRemark;
    @ExcelProperty(value = "字典状态",index = 4,converter = DataStatusConverter.class)
    private Integer dictStatus;
    @ExcelIgnore // 忽略和这个属性
    private List<DictData> dictDataList;
    @ExcelProperty(value = "创建时间",index = 5)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ExcelProperty(value = "最后修改时间",index = 6)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;

    public Long getDictId() {
        return dictId;
    }

    public void setDictId(Long dictId) {
        this.dictId = dictId;
    }

    public String getDictName() {
        return dictName;
    }

    public void setDictName(String dictName) {
        this.dictName = dictName;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public String getDictRemark() {
        return dictRemark;
    }

    public void setDictRemark(String dictRemark) {
        this.dictRemark = dictRemark;
    }

    public Integer getDictStatus() {
        return dictStatus;
    }

    public void setDictStatus(Integer dictStatus) {
        this.dictStatus = dictStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public List<DictData> getDictDataList() {
        return dictDataList;
    }

    public void setDictDataList(List<DictData> dictDataList) {
        this.dictDataList = dictDataList;
    }
}
